package com.dfbz.netctoss.controller;

import com.dfbz.netctoss.Result;
import com.dfbz.netctoss.service.AccountService;
import com.dfbz.netctoss.service.BillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@RequestMapping("/bill")
public class BillController {

    @Autowired
    BillService service;

    @RequestMapping("toList")
    public String toIndex(){
        return "bill/bill_list";
    }

    @RequestMapping("selectPage/{pageNum}/{pageSize}")
    @ResponseBody
    public Result selectPage(@PathVariable int pageNum, @PathVariable int pageSize, @RequestParam String keywords){
        return new Result(true, "查询成功", service.selectPage(pageNum, pageSize, keywords));
    }


}
